#ifndef FOLDERDATASOURCE_H
#define FOLDERDATASOURCE_H
#include <QAbstractItemModel>
#include "foldermodel.h"

class FolderDatasource : public QAbstractListModel
{
public:
    FolderDatasource();
     QVariant data(const QModelIndex &index, int role) const override;
    QModelIndex index(int row, int column,
                      const QModelIndex &parent = {}) const override;
     QModelIndex parent(const QModelIndex &index) const override;
    int rowCount(const QModelIndex &parent = {}) const override;
         int columnCount(const QModelIndex &parent = {}) const override;

    bool appendRows(QVector<FolderModel *>* newModels);

    FolderModel *getItem(const QModelIndex &index) const;

    void test();
    QVariant headerData(int section,Qt::Orientation orientation,int role)const override;

private:
     QVector<FolderModel *> * models;

};

#endif // FOLDERDATASOURCE_H
